@include('admin.header')

<style type="text/css">
  .opartion {
    width: 350px;
  }

  .pagination {
    list-style: none;
    float: right;
  }

  .pagination li {
    float: left;
    padding-left: 5px;
    padding-right: 5px;
  }

  .input_search {
    margin-top: 10px;
  }
</style>

<div class="wrap">
  <div class="margin-bottom-20">
    <!-- <a class="btn btn-primary edit"><i class="fa fa-plus"></i> 添加</a> -->
    {{ csrf_field() }}
    <input id="change_url" value="" type="hidden"/>
    <form action="{{url('wallet/fundfreeze')}}" method="post">
        <div class="cl pd-5 bg-1 bk-gray mt-20">
         冻结编号：
       <input type="text" style="width: 200px;height: 35px;" name="hisid" value="{{$hisid or ''}}"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       
        冻结钱包编号：
       <input type="text" style="width: 200px;height: 35px;" name="purseid" value="{{$purseid or ''}}"/>
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          钱包类型：
        <select name="pursetype" style="width: 120px;">
          <option value=''>--请选择--</option>
          <option value='0_None' @if($pursetype=='None'){echo selected="selected";} @endif>None</option>
          <option value='1_收益账户' @if($pursetype=='收益账户'){echo selected="selected";} @endif>收益账户</option>
          <option value='2_现金账户' @if($pursetype=='现金账户'){echo selected="selected";} @endif>现金账户</option>
          <option value='3_积分账户' @if($pursetype=='积分账户'){echo selected="selected";} @endif>积分账户</option>
          <option value='4_o2o收益账户' @if($pursetype=='o2o收益账户'){echo selected="selected";} @endif>o2o收益账户</option>
          <option value='96_过账账户' @if($pursetype=='过账账户'){echo selected="selected";} @endif>过账账户</option>
          <option value='97_授信账户' @if($pursetype=='授信账户'){echo selected="selected";} @endif>授信账户</option>
          <option value='98_中央银行账户' @if($pursetype=='中央银行账户'){echo selected="selected";} @endif>中央银行账户</option>
          <option value='99_系统收益账户' @if($pursetype=='系统收益账户'){echo selected="selected";} @endif>系统收益账户</option>
        </select>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        状态：
        <select name="state" style="width: 120px;">
          <option value=''>--请选择--</option>
          <option value='0'  @if($state=='None'){echo selected="selected";} @endif>未处理</option>
          <option value='1'  @if($state=='用户账户'){echo selected="selected";} @endif>已处理</option>
        </select>
      
        <br/>

        拥有者类型：
        <select name="ownertype" style="width: 120px;">
          <option value=''>--请选择--</option>
          <option value='0_None'  @if($ownertype=='None'){echo selected="selected";} @endif>None</option>
          <option value='1_用户账户'  @if($ownertype=='用户账户'){echo selected="selected";} @endif>用户账户</option>
          <option value='2_商家账户'  @if($ownertype=='商家账户'){echo selected="selected";} @endif>商家账户</option>
          <option value='3_企业账户'  @if($ownertype=='企业账户'){echo selected="selected";} @endif>企业账户</option>
          <option value='99_系统账户'  @if($ownertype=='系统账户'){echo selected="selected";} @endif>系统账户</option>
        </select>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      
      拥有者ID：
       <input type="text" style="width: 200px;height: 35px;" name="ownerid" value="{{$ownerid or ''}}"/>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

      拥有者账号：
       <input type="text" style="width: 200px;height: 35px;" name="nodecode" value="{{$nodecode or ''}}"/>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            <span class="text-c">
            <button name="" id="search" class="btn btn-success user_search" type="
            submit"><i class="Hui-iconfont"></i> 搜索</button>
            </span>
            <span class="r">共有数据：<strong>{{$data->total()}}</strong> 条</span>
        </div>
    </form>
  </div>
  <form class="form-horizontal js-ajax-form" method="post" novalidate="novalidate">
    <table class="table table-hover table-bordered">
      <thead>
      <tr>
        <th>冻结编号</th>
        <th>冻结钱包</th>
        <th>钱包类型</th>
        <th>拥有者Id </th>
        <th>拥有者账号</th>
        <th>拥有者姓名</th>
        <th>拥有者类型</th>
        <th>货币类型 </th>
        <th>冻结金额</th>
        <th>转帐流水</th> 
        <th>处理状态</th>
        <th>创建时间</th>
        <th>处理时间 </th>
        <th>用户备注</th>
        <th>操作员备注 </th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      @foreach($data as $val)
      <tr>
        <td>{{$val->hisid}}</td>
        <td>{{$val->purseid}}</td>
        <td>
          @if($val->pursetype == 0)
              <span>None</span>
          @elseif($val->pursetype == 1)
              <span>收益账户</span>
          @elseif($val->pursetype == 2)
              <span>现金账户</span>
          @elseif($val->pursetype == 3)
              <span>积分账户</span>
          @elseif($val->pursetype == 4)
              <span>o2o收益账户</span>    
          @elseif($val->pursetype == 96)
              <span>过账账户</span>    
          @elseif($val->pursetype == 97)
              <span>授信账户</span>    
          @elseif($val->pursetype == 98)
              <span>中央银行账户</span>            
          @else
              <span>系统收益账户</span>    
          @endif
        </td>
        <td>{{$val->ownerid}}</td>
        <td>{{$val->nodecode}}</td>
        <td>{{$val->nodename}}</td>
        <td>
          @if($val->ownertype == 0)
              <span>None</span>
          @elseif($val->ownertype == 1)
              <span>用户账户</span>
          @elseif($val->ownertype == 2)
              <span>商家账户</span>
          @elseif($val->ownertype == 3)
              <span>企业账户</span>
          @else
              <span>系统账户</span>    
          @endif
        </td>
         <td>{{$val->currency_type}}</td>

         <td style="color:red;">{{$val->amount}}</td>
         <td>{{$val->transferid}}</td>

        <td>
          @if($val->state == 0)
          <span>未处理</span> 
          @else
              
          <span>已处理</span>    
          @endif
        </td>
         <td>{{$val->createtime}}</td>
         <td>{{$val->optime}}</td>
         <td>{{$val->remarks}}</td>
         <td>{{$val->opremarks}}</td>
         <td>
           <span><a _id="{{$val->hisid}}" class="jiedong">解冻</a></span> 
         </td>
        

      
       
      </tr>
      @endforeach
      </tbody>
    </table>

    <!-- 分页 -->
    @if (!empty($data))
    <div class="page_list">
        {{$data->links()}}
    </div>
    @endif
  </form>
</div>

<script>
$(function(){
    //冻结资金
    $('.jiedong').click(function() {
      var id = $(this).attr('_id') || 0;
      open_iframe_layer('/wallet/unfreeze_funds?hisid='+id);
    });

});
//详情
// $('.apply_action').click(function() {
//   var id = $(this).attr('_id');
//    if(confirm("确定要审核通过吗？")){
//       $.ajax({
//             type: 'GET',
//             url: '/system/apply_action?id='+id,
//             dataType: 'json',
//             success: function(data){
               
//             },
           
//          });
//    }
        
//    });


</script>